﻿using Microsoft.Extensions.DependencyInjection;
using PHMEE.MqttClient.MqttBusinessCommand;
using PHMEE.MqttClient.Workers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Modularity;

namespace PHMEE.MqttClient
{
    public static class PHMEEMqttClientExtension
    {
        public static void RegisterService(this ServiceConfigurationContext context)
        {
            context.Services.AddHostedService<DtCollectionWorker>();
            context.Services.AddHostedService<HeartbeatMonitorService>();
            #region 主题服务
            //通知重启
            context.Services.AddTransient<IssueRestartCommand>();
            //注册
            context.Services.AddTransient<RegisterCommand>();
            //请求策略参数
            context.Services.AddTransient<SysParaCommand>();
            //请求采集参数
            context.Services.AddTransient<CollectParaCommand>();
            //请求升级⽂件列表
            context.Services.AddTransient<UpdateFileListCommand>();
            //传输波形数据
            context.Services.AddTransient<WaveDataCommand>();
            //传输指标数据
            context.Services.AddTransient<IndexDataCommand>();
            //自检测
            context.Services.AddTransient<CheckDataCommand>();
            //传输⽇志⽂件
            context.Services.AddTransient<LogFileCommand>();
            #endregion

        }
    }
}
